package com.jse.oo.design.pattern.structural.bridge;

import org.junit.Test;

public class BridgeTest {

	/**
	 * 参考jdbc的DriverManager.getConnection，不同的数据库，Driver实现不一样，Class.forName相当于传入驱动
	 */
	@Test
	public void testSimple() {
		Bridge bridge1 = new Bridge(new Foo1());
		bridge1.bridge();
		
		Bridge bridge2 = new Bridge(new Foo2());
		bridge2.bridge();
	}
}
